﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace KPIS.GERP.Models.HRM
{
    [DataContract, Table("hrm_mp_job_site_types")]
    public class MasJobSiteType
    {
        public MasJobSiteType()
        {
            RecordStatus = "U";
        }

        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        [DataMember, Display(Name = "JobSiteTypeId", ResourceType = typeof(Resources.MasJobSiteTypeResource))]
        [Column("job_site_type_seq")]
        public int JobSiteTypeId { get; set; }

        [DataMember, Display(Name = "Name", ResourceType = typeof(Resources.MasJobSiteTypeResource))]
        [Column("job_site_type_name")]
        public string Name { get; set; }

        [ForeignKey("CurrentJobSite")]
        [DataMember, Display(Name = "CurrentJobSiteId", ResourceType = typeof(Resources.MasJobSiteTypeResource))]
        [Column("curr_job_site_seq")]
        public int? CurrentJobSiteId { get; set; }

        [DataMember, Display(Name = "Remarks", ResourceType = typeof(Resources.MasJobSiteTypeResource))]
        [Column("remarks")]
        public string Remarks { get; set; }

        [EnumDataType(typeof(SYS.RecordStatus.EnumRecordStatus))]
        [DataMember, Display(Name = "RecordStatus", ResourceType = typeof(Resources.MasJobSiteTypeResource))]
        [Column("record_status")]
        public string RecordStatus { get; set; }

        [Column("created_by")]
        public int? CreatedBy { get; set; }

        [Column("created_when")]
        public DateTime? CreatedWhen { get; set; }

        [Column("updated_by")]
        public int? UpdatedBy { get; set; }

        [Column("updated_when")]
        public DateTime? UpdatedWhen { get; set; }

        [DataMember]
        public virtual HRM.JobSite CurrentJobSite { get; set; }
    }
}
